Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 skin-theme-clientpref-day vector-sticky-header-enabled" lang="de" dir="ltr"><head>
<meta charset="UTF-8">
<title>Counter Mode</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://de.wikipedia.org/wiki/Counter_Mode"> <link href="./_mw_/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link href="./_mw_/ext.gadget.citeRef.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.defaultPlainlinks.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiCommonHide.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiCommonLayout.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiCommonStyle.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiDarkmode.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.dewikiResponsive.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.gadget.specialSearch.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Counter_Mode rootpage-Counter_Mode skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Counter Mode</span></h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="de" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="de" dir="ltr"><p><b>Counter Mode</b> (<b>CTR</b>) ist eine <a href="Betriebsmodus_(Kryptographie)" title="Betriebsmodus (Kryptographie)">Betriebsart</a>, in der <a href="Blockchiffre" class="mw-redirect" title="Blockchiffre">Blockchiffren</a> betrieben werden können, um daraus eine <a href="Stromchiffre" class="mw-redirect" title="Stromchiffre">Stromchiffre</a> zu erzeugen. Hierbei wird ein erzeugter Geheimtextblock mittels XOR-Operation mit dem Klartext kombiniert.
</p>

<div class="mw-heading mw-heading2"><h2 id="Allgemeines">Allgemeines</h2></div>
<p>Die Besonderheit des Counter Mode im Vergleich zu anderen Betriebsarten, stellt die Tatsache dar, dass der <a href="Initialisierungsvektor" title="Initialisierungsvektor">Initialisierungsvektor</a> hier aus einer für jedes Chiffrat neu zu wählenden Zufallszahl (<a href="Nonce" title="Nonce">Nonce</a>) verknüpft mit einem Zähler besteht, der mit jedem weiteren Block hochgezählt wird. Die Verknüpfung kann z.&nbsp;B. durch Konkatenation (Anhängen), Addition oder <a href="XOR" class="mw-redirect" title="XOR">XOR</a> erfolgen.
</p>
<div class="mw-heading mw-heading2"><h2 id="Verschlüsselung"><span id="Verschl.C3.BCsselung"></span>Verschlüsselung</h2></div>
<p>Zur Verschlüsselung wird ein <a href="Initialisierungsvektor" title="Initialisierungsvektor">Initialisierungsvektor</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle ctr_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mi>t</mi>
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle ctr_{i}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/5118b2092eee33bfdf843c5381feaa06d4be8949.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.695ex; height:2.343ex;" alt="{\displaystyle ctr_{i}}" loading="lazy"></span> mit dem Schlüssel <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle K}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>K</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle K}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/2b76fce82a62ed5461908f0dc8f037de4e3686b0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.066ex; height:2.176ex;" alt="{\displaystyle K}" loading="lazy"></span> verschlüsselt und so ein Zwischenschlüssel produziert. Dieser wird im Anschluss mittels einer XOR-Operation mit dem Klartext kombiniert. Daraus entsteht der Geheimtext.
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle C_{i}=P_{i}\oplus E_{K}(ctr_{i})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>C</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>=</mo>
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>⊕<!-- ⊕ --></mo>
<msub>
<mi>E</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>K</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>c</mi>
<mi>t</mi>
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle C_{i}=P_{i}\oplus E_{K}(ctr_{i})}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/8f222f54fd689291c2bd1a25b217b93f93715453.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.605ex; height:2.843ex;" alt="{\displaystyle C_{i}=P_{i}\oplus E_{K}(ctr_{i})}" loading="lazy"></span></dd></dl>
<p><span class="mw-default-size" typeof="mw:File"></span>
</p>
<div class="mw-heading mw-heading2"><h2 id="Entschlüsselung"><span id="Entschl.C3.BCsselung"></span>Entschlüsselung</h2></div>
<p>Zur Entschlüsselung wird wieder derselbe Zähler <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle ctr_{i}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>c</mi>
<mi>t</mi>
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle ctr_{i}}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/5118b2092eee33bfdf843c5381feaa06d4be8949.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.695ex; height:2.343ex;" alt="{\displaystyle ctr_{i}}" loading="lazy"></span> mit dem Schlüssel <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle K}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>K</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle K}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/2b76fce82a62ed5461908f0dc8f037de4e3686b0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.066ex; height:2.176ex;" alt="{\displaystyle K}" loading="lazy"></span> <i>verschlüsselt</i>, um den gleichen Zwischenschlüssel zu erhalten. Dieser wird nun mittels einer XOR-Operation auf den Geheimtext angewendet, so dass der Klartext wiedergewonnen wird.
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P_{i}=C_{i}\oplus E_{K}(ctr_{i})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>=</mo>
<msub>
<mi>C</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>⊕<!-- ⊕ --></mo>
<msub>
<mi>E</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>K</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>c</mi>
<mi>t</mi>
<msub>
<mi>r</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P_{i}=C_{i}\oplus E_{K}(ctr_{i})}</annotation>
</semantics>
</math></span><img src="./_assets_/eb734a37dd21ce173a46342d1cc64c92/5e20e289378d533c91d2e13b462702524b75f061.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:19.605ex; height:2.843ex;" alt="{\displaystyle P_{i}=C_{i}\oplus E_{K}(ctr_{i})}" loading="lazy"></span></dd></dl>
<p><span class="mw-default-size" typeof="mw:File"></span>
</p>
<div class="mw-heading mw-heading2"><h2 id="Vorteile">Vorteile</h2></div>
<p>Counter Mode ist wie <a href="Output_Feedback_Mode" title="Output Feedback Mode">Output Feedback Mode</a> ein Betriebsmodus, der es erlaubt, eine Blockchiffre als Stromchiffre zu betreiben. Die Vorteile des OFB-Modus gegenüber <a href="Cipher_Block_Chaining_Mode" title="Cipher Block Chaining Mode">Cipher Block Chaining Mode</a>, <a href="Cipher_Feedback_Mode" title="Cipher Feedback Mode">Cipher Feedback Mode</a> und anderen Modi, welche klartextabhängige Daten für den nächsten Block weiterverwenden, kommen auch hier zum Tragen:
</p>
<ul><li>Bitfehler bei der Übertragung ergeben Fehler bei nur den entsprechenden Bits des Klartextes (anstatt einen ganzen Block bzw. eventuell sogar einen weiteren Block unbrauchbar zu machen)</li>
<li>Verschlüsselung und Entschlüsselung sind identisch, daher können hier auch Einwegfunktionen verwendet werden</li>
<li>Der Schlüsselstrom kann vorausberechnet werden.</li></ul>
<p>Im Gegensatz zum <a href="OFB" class="mw-redirect" title="OFB">OFB</a>-Modus aber hängt der Schlüssel für einen Block nicht vom Schlüssel für den vorherigen Block ab, daher:
</p>
<ul><li>hat man hier wahlfreien Zugriff auf jeden verschlüsselten Block und</li>
<li>sämtliche Ver- und Entschlüsselungsoperationen können parallel durchgeführt werden.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Anwendungsgebiete">Anwendungsgebiete</h2></div>
<ul><li>In <a href="ZIP_(Dateiformat)" class="mw-redirect" title="ZIP (Dateiformat)">ZIP</a>-Archiven in Kombination mit <a href="Advanced_Encryption_Standard" title="Advanced Encryption Standard">AES</a>.</li>
<li>In <a href="Transport_Layer_Security" title="Transport Layer Security">TLS</a> 1.2 in Kombination mit <a href="Advanced_Encryption_Standard" title="Advanced Encryption Standard">AES</a> (als Bestandteil im Betriebsmodus <a href="Galois/Counter_Mode" title="Galois/Counter Mode">GCM</a>).</li>
<li>In <a href="Off-the-Record_Messaging" title="Off-the-Record Messaging">Off-the-Record Messaging</a> in Kombination mit <a href="Advanced_Encryption_Standard" title="Advanced Encryption Standard">AES</a>.</li>
<li>In der Payload Verschlüsselung im Bluetooth Link Layer (AES-CTR).</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Literatur">Literatur</h2></div>
<ul><li>Claudia Eckert: <cite style="font-style:italic">IT-Sicherheit</cite>. 5. Auflage. 2008, ISBN 978-3-486-58270-3.<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rfr_id=info:sid/de.wikipedia.org:Counter+Mode&amp;rft.au=Claudia+Eckert&amp;rft.btitle=IT-Sicherheit&amp;rft.date=2008&amp;rft.edition=5.&amp;rft.genre=book&amp;rft.isbn=9783486582703" style="display:none">&nbsp;</span></li></ul>
<style data-mw-deduplicate="TemplateStyles:r260755238">
/* start https://de.wikipedia.org/ */


.mw-parser-output div.klappleiste{border:1px solid var(--dewiki-rahmenfarbe1);clear:both;font-size:95%;box-sizing:border-box;margin-top:1.5em;padding:2px}.mw-parser-output div.klappleiste:after{clear:both;content:"";display:block}.mw-parser-output div.klappleiste-bild{float:left;padding:2px}.mw-parser-output div.klappleiste-kopf{background:var(--dewiki-hintergrundfarbe5);color:var(--color-base,#202122);text-align:center;font-weight:bold}.mw-parser-output div.klappleiste.mw-collapsed .klappleiste-bild{display:none}.mw-parser-output div.klappleiste+div.klappleiste,.mw-parser-output div.klappleiste+link+div.klappleiste,.mw-parser-output div.klappleiste+link+link+div.klappleiste,.mw-parser-output div.klappleiste+link+style+div.klappleiste,.mw-parser-output div.klappleiste+style+div.klappleiste,.mw-parser-output div.klappleiste+style+style+div.klappleiste,.mw-parser-output div.klappleiste+style+link+div.klappleiste{margin-top:-1px}@media screen{html.skin-theme-clientpref-night .mw-parser-output .klappleiste-bild span[typeof="mw:File"]:not(.skin-invert-image) img{background-color:#c8ccd1}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .klappleiste-bild span[typeof="mw:File"]:not(.skin-invert-image) img{background-color:#c8ccd1}}


/* end https://de.wikipedia.org/ */
</style>
<div class="klappleiste mw-collapsible navileiste navigation-not-searchable center" role="navigation">
<div class="klappleiste-kopf"><a href="Betriebsmodus_(Kryptographie)" title="Betriebsmodus (Kryptographie)">Betriebsmodi von Blockchiffren</a></div>
<div class="klappleiste-inhalt mw-collapsible-content">
<p><i>Ohne Authentifizierung:</i>
<a href="Electronic_Code_Book_Mode" title="Electronic Code Book Mode">ECB</a>&nbsp;•
<a href="Cipher_Block_Chaining_Mode" title="Cipher Block Chaining Mode">CBC</a>&nbsp;•
<a href="Cipher_Feedback_Mode" title="Cipher Feedback Mode">CFB</a>&nbsp;•
<a href="Output_Feedback_Mode" title="Output Feedback Mode">OFB</a>&nbsp;•
<a class="mw-selflink selflink">CTR</a>&nbsp;•
<a href="XTS-AES" title="XTS-AES">XTS</a>
</p><p><i>Mit Authentifizierung:</i>
<a href="CCM-Modus" title="CCM-Modus">CCM</a>&nbsp;•
<a href="Galois/Counter_Mode" title="Galois/Counter Mode">GCM</a>&nbsp;•
<a href="EAX-Modus" title="EAX-Modus">EAX</a>
</p>
</div></div></div><!--htdig_noindex--><div><div class="zim-footer">
Dieser Artikel wurde von <a class="external text" title="Zuletzt bearbeitet am 2024-10-08" href="https://de.wikipedia.org/wiki/?title=Counter_Mode&amp;oldid=249259961">Wikipedia</a> herausgegeben. Der Text ist unter <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.de">Creative Commons Attribution-Share Alike 4.0</a> verfügbar, sofern nicht anders angegeben. Für die Mediendateien können zusätzliche Bedingungen gelten.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>

</body></html>